package com.atguigu.spzx.service.order.client.feign;

import com.atguigu.spzx.model.common.Result;
import com.atguigu.spzx.model.entity.h5.OrderInfo;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

/**
 * title:
 * author: zgl
 * date: 2024/1/21
 * description：
 */
@FeignClient(value = "service-order")
public interface OrderClient {
    @Operation(summary = "根据订单编号获取订单信息")
    @GetMapping("/api/order/orderInfo/auth/getOrderInfoByOrderNo/{orderNo}")
    public Result<OrderInfo> getOrderInfo(@PathVariable String orderNo);


    @Operation(summary = "更新订单信息")
    @PutMapping("/api/order/orderInfo/auth/updateOrderStatusPayed/{orderNo}/{orderStatus}")
    public Result<OrderInfo> updateOrderStatusPayed(@PathVariable String orderNo,@PathVariable Integer orderStatus);
}
